<div class="navbar navbar-default navbar-fixed-top" id="navigation" ng-controller="NavigationController">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#/home">{{ app_name }}</a>
        </div>
        <div class="navbar-collapse collapse">
            {% if user_id %}
            <ul class="nav navbar-nav">
                {% if is_admin %}
                <li ng-class="{ active: isActive('/users')}"><a href="#/users">Users</a></li>
                {% endif %}
                <li ng-class="{ active: isActive('/profile')}"><a href="#/profile/{{ user_id }}">Profile</a></li>
                <li ng-class="{ active: isActive('/weather')}"><a href="#/weather">Weather</a></li>
            </ul>
            <form id="logout" class="navbar-form login-form navbar-right" method="get" action="/auth/logout">
                <button type="submit" class="btn btn-success">Logout {{ firstname }}</button>
            </form>
            {% else %}
            <ul class="nav navbar-nav">
                <li ng-class="{ active: isActive('/weather')}"><a href="#/weather">Weather</a></li>
            </ul>
            <form id="login" class="navbar-form login-form navbar-right" method="post" name="header_login_form" action="/auth/login">
                {% include 'partials/csrf_token.twig' %}
                <div class="form-group">
                    <input type="text" placeholder="Email" class="form-control" name="email" required="required">
                </div>
                <div class="form-group">
                    <input type="password" placeholder="Password" class="form-control" name="password" required="required">
                </div>
                <button type="submit" class="btn btn-success">Sign in</button>
            </form>
            {% endif %}
        </div><!--/.navbar-collapse -->
    </div>
</div>